package com.ccs.demo;


import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/calc2")
@RestController
public class calc2 {
    @RequestMapping("/sum")
    public String add(Integer num1,Integer num2){
        if(num1!=null && num2!=null ) {
            Integer sum=num1+num2;
            return "计算后的结果为："  + sum;
        }else{
            return "输入结果错误";
        }
    }


}
